Hundreds others were wounded many of whom received bullet and pellet injuries and are undergoing treatment in various hospitals.
Militants hurled grenade near a police station in the old city area of Jammu and Kashmir's summer capital, reports Mukhtar Ahmad/Rediff.com from Srinagar.
Burhan Wani, the top Hizbul Mujaheedin commander was the poster boy of the outfit and was active in south Kashmir.
The attack came on a day when the union home minister, Rajnath Singh is arriving in the valley to review the states security situation.
The slain militants are reported to belong to the district.
She defeated her nearest rival, Hilal Ahmad Shah of the Congress party by 12,085 votes. Mehbooba polled 17,701 votes.
The grenade missed the target and exploded on the roadside without causing any damage.
A senior police officer said troops of counter insurgency Rashtriya Rifles and police jointly surrounded a forest area near Lolab in frontier Kupwara district early on Thursday.
The bypoll assumes significance as Chief Minister Mehbooba Mufti is seeking her election to the assembly from the constituency.
"As the security forces were busy searching the area, the militants in hiding opened fire triggering a gunfight which is on. So far one militant has been killed," the officer said.
As soon as the operation ended, local residents started pelting stones at the security forces, he said, adding the clashes were going on till reports last came in.
Army foiled second infiltration attempt along the LoC in Kashmir in three days, reports Mukhtar Ahmad from Srinagar
A defence spokesman this evening confirmed five soldiers were injured in the gunfight so far.
From a trickle in 1990, when militancy erupted in the valley, the numbers have, however, gradually seen an upward trend.
A senior police officer said a group of heavily armed militants opened indiscriminate fire at a police vehicle in Bongam Qazigund of Kulgam district.
Jammu and Kashmir Chief Minister Mehbooba Mufti will on Wednesday file her nomination papers from the Anantnag assembly segment which fell vacant on the demise of her father and chief minister, Mufti Mohammad Sayeed.
Five militants were killed in a day-long fierce gunfight in frontier north Kashmir Kupwara district on Saturday.
Curfew-like restrictions were imposed in large parts of Srinagar on Saturday to foil Mirwaiz Umar Farooq's rally to commemorate his father's death anniversary.
Athar Aamir Ul Shafi Khan is thrilled that he stood second in his second attempt at cracking the prestigious UPSC civil services examination.
Victim says she was held in police custody 'against her will'.